package org.amphiprion.descentv2assistant.entity.comparator;

import java.util.Comparator;

import org.amphiprion.descentv2assistant.entity.Hero;

public class HeroArchetypeComparator implements Comparator<Hero> {

	@Override
	public int compare(Hero lhs, Hero rhs) {
		if (lhs.getArchetype().getName().equals(rhs.getArchetype().getName())) {
			return lhs.getName().compareTo(rhs.getName());
		} else {
			return lhs.getArchetype().getName().compareTo(rhs.getArchetype().getName());
		}
	}
}
